<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>新建试卷</title>
    <!--  引入核心皮肤-->
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <!--   引入核心js-->
    <script src="../../layui/layui.js"></script>
    <script >
        layui.use(['layer','jquery','table','form', 'laydate'],function () {
            let layer=layui.layer;//定义组件
            let $=layui.jquery;//定义组件
            let table =layui.table;//定义表格组件
            let form=layui.form;//定义表格组件
        })

    </script>
    <script>
        var callbackdata = function (){
            var date1 = document.getElementById("test1").value;
            var date2 = document.getElementById("test2").value;
            var questionname = document.getElementById("questionname").value;
            var interest1 = document.getElementById("interest1").value;
            var interest2 = document.getElementById("interest2").value;

            var data = {
                questionname: questionname,
                interest1:interest1,
                interest2:interest2,
                date1:date1,
                date2:date2
            }
            return data;
        }
    </script>
</head>
<body>

    <form  class="layui-form" id="add-form" >
        <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">开始日期</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="test1" placeholder="yyyy-MM-dd HH:mm:ss">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">开始日期</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="test2" placeholder="yyyy-MM-dd HH:mm:ss">
            </div>
        </div>
            </div>
        <div class="layui-form-item">
            <label class="layui-form-label">试卷名称</label>
            <div class="layui-input-block">
                <input type="text" name="questionname" id="questionname" lay-verify="required" autocomplete="off" placeholder="请输入试卷名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item"  >
            <label class="layui-form-label">试卷分类</label>
            <div class="layui-input-block">
                <select name="interest1"  id="interest1" lay-verify="required"lay-filter="aihao">
                    <option value=""></option>
                    <option value="0">语文</option>
                    <option value="1" selected="">数学</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item"  >
            <label class="layui-form-label">组卷方式</label>
            <div class="layui-input-block">
                <select name="interest1"  id="interest2" lay-verify="required"lay-filter="aihao">
                    <option value=""></option>
                    <option value="0">随机组卷</option>
                    <option value="1" selected="">选题组卷</option>
                </select>
            </div>
        </div>

    </form>
    <script>
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            //日期时间范围
            //日期时间选择器
            laydate.render({
                elem: '#test2'
                ,type: 'datetime'
            });
            laydate.render({
                elem: '#test1'
                ,type: 'datetime'
            });
        });
    </script>
</body>
</html>